<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta content="width=device-width, initial-scale=1.0" name="viewport">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">

  <META HTTP-EQUIV="pragma" CONTENT="no-cache">
  <meta http-equiv="pragma" content="no-store">
  <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
  <META HTTP-EQUIV="expires" CONTENT="0">


  <block name="seo"></block>

  <title>{$site_info['site_title']} {$version}<block name="title"></block> </title>
  <link href="__ROOT__/Public/boot/css/bootstrap.min.css" rel="stylesheet">
  <link href="__ROOT__/Public/{:C(DEFAULT_THEME)}/Static/css/myboot.css" rel="stylesheet" type="text/css" media="screen">
  <link href="__ROOT__/Public/{:C(DEFAULT_THEME)}/Static/css/base.css" rel="stylesheet" type="text/css" media="screen">
  <link rel="stylesheet" type="text/css" href="__ROOT__/Public/plug/datetimepicker/jquery.datetimepicker.css"/>

  <link href="__ROOT__/Public/icon/iconfont.css" rel="stylesheet">
  <link href="http://at.alicdn.com/t/font_767888_dacrmbkok1.css" rel="stylesheet">

  <block name="links"></block>

  <script src="__ROOT__/Public/boot/js/jquery.js"></script>

  <script src="__ROOT__/Public/plug/datetimepicker/build/jquery.datetimepicker.full.js"></script>
  <script>




  //实现后退刷新页面
  $.datetimepicker.setLocale('zh');
  </script>
  <?php
  if(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "MSIE 8.0")) {
  echo ' <link href="__ROOT__/Public/{:C(DEFAULT_THEME)}/Static/css/ie.css" rel="stylesheet" type="text/css" media="screen">';
  }
  ?>
  <block name="css"></block>
</head>



<body onbeforeunload="return hidden_msg()">

<style type="text/css">
  .iconfont{
    font-size: 17px;
  }
</style>


<!-- 头部功能菜单 -->
<div class="top">
<include file="Public@Public/header" />
</div>


<div class="row top50">
    <div class="sleft">
    	<div class="menu">
        <block name="sec_menu">
          <!-- 侧栏列表 -->
          <include file="Public@Public/sec_menu" />
        </block>
      </div>
    </div>

  	<div class="main">
      <!-- 右侧标题区 [必须]-->
      <div class="main_map">
        <block name="main_map">
          <ol class="breadcrumb">
            {$path_nav}
            <if condition="$back_url neq false">
            <li style="float:right"><a href="{$back_url}" class="btn btn-success btn-xs">返回上页</a></li>
            </if>

          </ol>
        </block>
      </div>

      <div class="main_body">
        <!-- 工具条【可选】 -->
        <block name="tools"></block>

        <!-- 主要内容区域【可选】 -->
        <block name="main_content">
          这里是主要区域
        </block>
      </div><!-- main_body -->
    </div>
</div>

<div class="alt_msg" style="display: none;">
  
</div>


<block name="footer">
  <block name="footer"><include file="Public@Public/footer" /></block>
</block>


<block name="script"></block>

<script type="text/javascript">
$.get("{:U('System/Index/message_info')}", function(result){
  if (result.code==1) {
    var str="";
    str=str+"<div class='show_msg'>";
    str=str+result.info;
    str=str+"</div>";
    $('.alt_msg').html(str);
    $('.alt_msg').show();
    $('.alt_msg').fadeOut(2000);
  }
});

function switch_dbs(key){
  $url="{:U('System/Api/switch_server')}?key="+key;
  $.get($url, function(result){
    if (result.code==0) {
      alert(result.info);
      window.location.reload();
    }
    else{
      alert(result.info);
    }
    
  });
}

</script>

<!-- 树形插件 -->

<script type='text/javascript' src='__ROOT__/Public/plug/btree/js/bootstrap-treeview.js'></script>
<script>
  $('#treeview').treeview({
    color: '#428bca',
    expandIcon: 'glyphicon glyphicon-chevron-right',
    collapseIcon: 'glyphicon glyphicon-chevron-down',
    // nodeIcon: 'iconfont icon-wenjianjia',
    emptyIcon:'iconfont icon-wenjian',
    data: {$site_menu},
    enableLinks:true,
    levels:2,
    highlightSelected:false,
  });
  
  // $('#treeview').treeview('expandNode', [ 0, {levels:2, silent:true} ]);
</script>


</body>
</html>
